package com.example.myactspringboot.Interceptor;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @Author Zhouchb
 * @Create 2024-03-11 21:05
 * @Description
 */
@Configuration
public class InterceptorConfig implements WebMvcConfigurer {
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(new MyInterceptor())//注册拦截器
                .addPathPatterns("/remote")
                .excludePathPatterns("/js/**","/css/**","/image/**","/","/doLogin");
    }
}
